data remove entity @s item.components."minecraft:custom_data".hubMenu.tips


$data modify entity @s item merge from storage vs:system gamerules[$(index)].item
$data modify entity @n[type=text_display,distance=..5,tag=hub.gameruleSettings.selectGamerule.text] text set value '{"storage": "vs:system","nbt": "gamerules[$(index)].name","interpret": true,"bold":true}'
$data modify entity @s item.components."minecraft:custom_data".hubMenu.tips set from storage vs:system gamerules[$(index)].tips
$data modify entity @s item.components."minecraft:custom_data".hubMenu.index set value $(index)

#value
$data modify storage vs:system temp.type set from storage vs:system gamerules[$(index)].type
$execute if data storage vs:system temp{type:"int"} run data modify entity @n[type=text_display,tag=hub.gameruleSettings.selectGamerule.value_text,distance=..10] text set value '{"nbt": "gamerules[$(index)].value","storage": "vs:system","color": "yellow"}'


data remove storage vs:system temp.type